import { Component, OnInit } from '@angular/core';
import { BehaviorSubject, from } from 'rxjs';

import { MessageService } from '../service/message.service'

@Component({
  selector: 'app-message',
  templateUrl: './message.component.html',
  styleUrls: ['./message.component.scss']
})
export class MessageComponent implements OnInit {

  constructor(public messageService:MessageService) { }

  ngOnInit(): void {
    console.log('初始化:',this.messageService);
  }

  close(){
    this.messageService.data.show=false;
  }

}
